package collection;

import java.util.ArrayList;
import java.util.List;


public class ListDemo {
    public static void main(String[] args) {
        List<String> list = new ArrayList<String>();
        list.add("A");
        list.add("B");
        list.add("C");
        System.out.println(list);
        System.out.println(list.size());
        System.out.println(list.get(0));


        String s1=list.get(0);
        System.out.println(s1);
        list.set(0,"ui");
        System.out.println(list);
        list.add(1,"ui");
        System.out.println(list);

        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }

    }
}
